<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    .waicontent{
      /* height: 200px; */
      width: 200px;
      border: 1px burlywood solid;
      /* overflow: hidden; 方案三*/ 
      /* zoom:1 */
    }
    .content1{  
      height: 50px;
      width: 50px;
      background-color: red;
      float: left;
      
      /* clear: both; */
      }
    .content2{  
      height: 50px;
      width: 50px;
      background-color: skyblue;
      float: left;
      /* clear: both; */
      }
    .content3{  height: 50px;
      width: 50px;
      background-color:salmon;
      float: left;
      /* clear: left; */
      }
      .content4{
        width: 500px;
        height: 200px;
        background-color: saddlebrown;
        /* float: left; */
      }
      .clear{
        /* clear: both; 方案一*/
      }
      .clearfix:after{
        content: '.';
        height: 0;
        display:  block;
        visibility: hidden;
        clear:both
        /* 方案三 */
      }
  </style>

</head>
<body>
  <!-- 
    清楚浮动的方法：
    方法一：在浮动元素后面使用一个空元素
  -->
  <div class="waicontent clearfix">
    <div class="content1">111</div>
    <div class="content2">222</div>
    <div class="content3">333</div>
    <div class="clear"></div>
  </div>
  <div class="content4">4444</div>
</body>
</html>